<?php

if (!defined('BASEPATH'))
    exit('No direct script access allowed');

class Home extends CI_Controller {
    
    public function __construct() {
        parent::__construct();
        $this->load->helper('url');
        $this->load->model('products_m');
        $this->load->model('admin/frontpage_m');
    } 

    public function index() {
        $temp = array();
        $temp['css'] = array('header','home');
        $temp['js'] = array('home');
        $this->load->view('open_v',$temp);
        $data['frontpage'] = $this->frontpage_m->get_home_frontpage();
        $this->load->view('home/home_v',$data);
        $this->load->view('close_v');
    }
    
    public function next_page($page=1){
        $data['frontpage'] = $this->frontpage_m->get_home_frontpage($page-1);
        $this->load->view('home/ajax_home_content',$data);
    }

}

/* End of file welcome.php */
/* Location: ./application/controllers/welcome.php */